<?php	
	
include ("./src/jpgraph.php");
include ("./src/jpgraph_line.php");
$graph = new Graph(900,550,"auto");
$graph->SetScale("textlin");

$graph->img->SetMargin(50,30,20,80);    
$graph->SetShadow();

$datax=array("V","Tomm","Atda","Boto","Tojo","mCm","Dres","Fran","Trep","Trem","Aren","Llvi","Llde","Cara","Ashg","Ldov","Wenl","Ludl","Prid","Gedi","Sieg","Emsi","Eife","Give","Fras","Fame","Tour","Vise","Serp","Bash","Mosc","Step","wolf","Leon","Guad","Tatr","Indu","Olen","Anis","Ladi","Carn","Nori","Hett","Sine","Plie","Toar","Aale","Bajo","Bath","Call","Oxfo","Kimm","Tith","Berr","Vala","Haut","Barr","Apti","Albi","Ceno","Turo","Coni","Sant","Camp","Maas","Dani","Than","Eo-l","Eo-m","Eo-u","Ol-l","Ol-u","Mi-l","Mi-m","Mi-u","Plio-l","Plio-u","Plei-l","Plei-u","R");
$datay=array("35","97","339","338","300","768","384","354","452","306","322","181","164","222","238","114","79","58","107","90","95","129","177","74","43","89","37","56","18","14","21","20","10","16","20","13","1","7","10","4","0","8","3","3","3","1","0","1","1","7","1","5","9","1","1","2","3","0","12","3","1","3","9","10","32","5","5","1","4","5","0","6","0","0","3","0","3","0","0","53");

$datay2=array("0","8","15","6","4","21","2","6","36","77","94","59","107","101","154","102","149","124","131","74","95","176","97","138","93","209","132","160","71","35","80","137","87","158","181","232","48","148","151","261","205","342","61","86","99","130","85","134","88","213","147","135","365","57","52","88","147","174","653","333","208","123","337","489","1156","473","870","618","727","774","410","880","483","407","775","69","414","2","44","3248");

$datay3=array("1","3","14","17","17","34","13","24","142","241","477","293","445","547","695","675","589","384","494","386","499","826","737","678","538","770","562","803","480","258","245","488","425","574","511","391","102","271","186","267","294","461","95","180","251","275","175","278","239","359","248","185","385","118","159","155","159","235","421","261","163","89","145","191","409","76","134","34","50","123","48","144","37","34","95","6","46","0","10","325");


$graph->title->Set("Sepkoski Curve/Special Graph 1");
$graph->title->SetFont(FF_FONT1,FS_BOLD);


$dplot = new LinePLot($datay);
$dplot2 = new LinePLot($datay2);
$dplot3 = new LinePLot($datay3);

$dplot->SetFillColor("blue");
$dplot2->SetFillColor("green");
$dplot3->SetFillColor("red");

$dplot->SetLegend("Cm");
$dplot2->SetLegend("Md");
$dplot3->SetLegend("Pz");


// Create the accumulated graph
$accplot = new AccLinePlot(array($dplot,$dplot3, $dplot2));

// Add the plot to the graph
$graph->Add($accplot);

//$p1 = new LinePlot($datay);
//$p1->SetFillColor("blue");
//$p1->mark->SetType(MARK_FILLEDCIRCLE);
//$p1->mark->SetFillColor("red");
//$p1->mark->SetWidth(4);
$graph->yaxis->title->SetMargin(10);

$graph->yaxis->title->Set("Number of Genera");
$graph->xaxis->SetTickLabels($datax);
$graph->xaxis->SetLabelAngle(90);
$graph->xaxis->title->SetMargin(40);
$graph->Stroke();
?>